package com.brillilab.service.module.message.template.impl.space;

import com.brillilab.service.module.message.template.AbstractMessageTemplate;
import com.brillilab.service.module.message.template.enums.MessageTypeEnum;
import lombok.Data;

/**
 * @author zlb
 * @Title: PrivatePlaneModifyTemp
 * @ProjectName brill_lab
 * @Description: 私有平面被修改成功为-公用
 * @date 2019/5/27 15:42
 */
@Data
public class PrivatePlaneModifyTemp extends AbstractMessageTemplate {
    private String labName;
    private Integer deviceNo;
    private String planeNo;

    /**
     * 私有平面被修改成功为-公用
     *
     * @param labId       实验室ID
     * @param receiverId  接收人ID
     * @param labMemberId 接收者实验室成员Id
     * @param labName     实验室名称
     * @param deviceNo    设备编号
     * @param planeNo     平面序号
     */
    public PrivatePlaneModifyTemp(Long labId, Long receiverId, Long labMemberId, String labName, Integer deviceNo, String planeNo) {
        super(labId, receiverId);
        super.setType(MessageTypeEnum.PrivatePlaneModify.getValue());
        super.setTitle("您的私有平面已被设为公用");
        String content = String.format("<span>您在</span>" +
                        "<span style='color:#F6AC2D'>%s</span>" + "<span>的</span>" +
                        "<span style='color:#F6AC2D'>%s</span>" + "<span>设备内</span>" +
                        "<span style='color:#F6AC2D'>%s</span>" + "<span>平面已被设置为公用，</span>" +
                        "<span>如有疑问请联系实验室管理员</span>",
                labName, deviceNo, planeNo);
        super.setContent(content);
        super.setAppContent(String.format("您在%s的%s设备内%s平面已被设置为公用，如有疑问请联系实验室管理员",labName, deviceNo, planeNo));
        this.labMemberId = labMemberId;
        this.labName = labName;
        this.deviceNo = deviceNo;
        this.planeNo = planeNo;
    }

}
